From: Florian Müllner Date: Tue, 16 Feb 2021 19:15:21 +0000 (+0100) Subject: workspaceThumbnails: Only show for more than two workspaces X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~278 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2fdee8e44432cd840e937bba9abf1b9af3e96ef7;p=gnome-shell.git workspaceThumbnails: Only show for more than two workspaces As adjacent workspaces now peek into the window picker, the first two workspaces are already accessible without the minimap. Hide it in that case to give more space to the window picker, and to not clutter the overview for users who aren't using workspaces. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3739 Part-of: --- diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 6f009b8a0..933a0d5d4 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -8,6 +8,8 @@ const Main = imports.ui.main; const Util = imports.misc.util; const Workspace = imports.ui.workspace; +const NUM_WORKSPACES_THRESHOLD = 2; + // The maximum size of a thumbnail is 5% the width and height of the screen var MAX_THUMBNAIL_SCALE = 0.05; @@ -718,8 +720,9 @@ var ThumbnailsBox = GObject.registerClass({ _updateShouldShow() { const { nWorkspaces } = global.workspace_manager; - const shouldShow = - this._settings.get_boolean('dynamic-workspaces') || nWorkspaces > 1; + const shouldShow = this._settings.get_boolean('dynamic-workspaces') + ? nWorkspaces > NUM_WORKSPACES_THRESHOLD + : nWorkspaces > 1; if (this._shouldShow === shouldShow) return;